<%@ page language="java" import="java.util.*,com.knife.member.*" pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("UTF-8");
String msg = "";
String password = "123456";
int	uid	=0;
if(request.getParameter("uid")!=null){
	uid				= Integer.parseInt(request.getParameter("uid"));
}
if(request.getParameter("password")!=null){
	password 	= request.getParameter("password");
}
UserinfoDAO userDAO = new UserinfoDAO();
Userinfo newUser=new Userinfo();
	if(uid>0){
		newUser = userDAO.findById((long)uid);
		password=CheckPassword.generatePassword(password);
		newUser.setPassword(password);
	}
	try{
		userDAO.save(newUser);
		msg="设置成功！";
	}catch(Exception e){
		msg="设置失败！";
	}
%><%=msg%>